home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: How do you reset the computer using C on a PC ?
- Date: 24 Mar 1996 08:16:00 +1200
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Distribution: world
- Message-ID: <4j1m60$8l5@airdmhor.gen.nz>
- References: <31473FD4.48AA@ccis.com> <Pine.A32.3.91.960313183048.180818A-100000@red.weeg.uiowa.edu> <4ibj64$u2@hermes.is.co.za>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jan Kaluza:
- > More seriously: when you want to reset the PC, call this function:
-
- > void resetPC(void) {
- > struct REGPACK rr;
- > intr(25,&rr);
- > }
-
- > This works for Turbo C/Borland C. For other compilers there must be an
- > equivalent. Interrupt 25 resets the PC in DOS. I found it hangs up a
- > DOS session in Windows rather nastily.
-
- Don't call int 25, it's the _WRONG_ thing to do. It doesn't reset all
- machines blah blah blah blah blah.... <grunt> I've said it so many times
- before.. I can't be bothered.
-